package com.lizhi.note.repository;


import com.lizhi.note.entity.NotepageEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface NotepageRepository extends JpaRepository<NotepageEntity, Long> {

    Optional<NotepageEntity> findByTitle(String title);

    List<NotepageEntity> findByNotebookId(Long notebookId);

    List<NotepageEntity> findByNotebookIdOrderByUpdateTimeDesc(Long notebookId);
}
